/**
 * 中间件
 * 设置响应头，解决跨域
 */
module.exports = async (ctx, next) => {
  ctx.set("Content-Type", "application/json; charset=utf-8");
  // 设置跨域
  ctx.set("Access-Control-Allow-Origin", "*");
  ctx.set("Access-Control-Methods", "*")
  await next()
}